//
//  YKStateMachine.h
//  YK_BaseTools
//
//  Created by edward on 2021/9/30.
//

#import <Foundation/Foundation.h>
#import "YKStateMachineProtrocol.h"

NS_ASSUME_NONNULL_BEGIN

@interface YKStateMachine : NSObject

/// 根据传入的可选状态初始化状态机
/// @param states 该状态下可以进入的模式
+ (instancetype)stateMachineWithStates:(NSDictionary *)states;

/// 状态机进入传入状态
/// @param stateName 将要进入的状态
- (BOOL)enterState:(NSString *)stateName container:(id<YKStateMachineContainerProtrocol>)container;


/// 返回当前状态
- (NSString *)currentStateName;

@end

NS_ASSUME_NONNULL_END
